package com.tianjs.observer.listener.impl;

import com.tianjs.observer.listener.Observer;

public class User implements Observer {

	private String name;
    private String message;
    
	public User(String name) {
		this.name = name;
	}

	@Override
	public void update(String msg) {
		this.message = msg;
        read();
	}

	public void read() {
        System.out.println(name + " 收到推送消息： " + message);
    }
}
